# -*- coding: utf-8 -*-
from django.db import models


class BaseModel(models.Model):
    DELETE_FLAGS = [
        ("Y", "Y"),
        ("N", "N")
    ]
    create_time = models.DateTimeField(auto_now_add=True, verbose_name="创建时间")
    update_time = models.DateTimeField(auto_now=True, verbose_name="修改时间")
    delete_flag = models.CharField(max_length=1, default="N", choices=DELETE_FLAGS, verbose_name="删除标记")

    # 抽象基类
    class Meta:
        abstract = True
